from django.conf.urls import patterns, include, url
from django.conf import settings
from django.conf.urls.defaults import *
from django.contrib import admin
from django.contrib.contenttypes.models import ContentType
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib.auth.decorators import login_required	

urlpatterns=patterns('',
	#(r'^login/$', 'django.contrib.auth.views.login', {'template_name':'toast/static/login.html'}),
)

urlpatterns+=patterns('toast.views',

	url(r'^about/$', 'about'),
	url(r'^help/$', 'help'),

	url(r'^$', 'meeting_default'),
	# Follow this naming convention for routes. The action should appear before 
	# the element ID (if applicable). There should be a default route if no ID
	# is provided.

	#
	url(r'^meeting/$', 'meeting_default'),
	url(r'^meeting/view/$', 'meeting_default'),
	url(r'^meeting/view/(?P<meeting_id>\d+)/$', 'meeting_view'),
	url(r'^meeting/edit/(?P<meeting_id>\d+)/$', 'meeting_edit'),
	url(r'^meeting/add/$', '_meeting_add'),
	url(r'^meeting/delete/(?P<meeting_id>\d+)/$', '_meeting_delete'),

	#
	url(r'^member/$', 'member_default'),
	url(r'^member/view/$', 'member_default'),
	url(r'^member/view/(?P<member_id>\d+)/$', 'member_view'),
	url(r'^member/edit/(?P<member_id>\d+)/$', 'member_edit'),
	url(r'^member/add/$', '_member_add'),
	url(r'^member/delete/(?P<member_id>\d+)/$', '_member_delete'),

	#
	url(r'^attendance/$', 'attendance_default'),
	url(r'^attendance/view/$', 'attendance_default'),
	url(r'^attendance/view/(?P<attendance_id>\d+)/$', 'attendance_view'),
	url(r'^attendance/edit/(?P<attendance_id>\d+)/$', 'attendance_edit'),
	url(r'^attendance/add/$', '_attendance_add'),
	url(r'^attendance/delete/(?P<attendance_id>\d+)/$', '_attendance_delete'),

	#
	url(r'^participation/$', 'participation_default'),
	url(r'^participation/view/$', 'participation_default'),
	url(r'^participation/view/(?P<participation_id>\d+)/$', 'participation_view'),
	url(r'^participation/edit/(?P<participation_id>\d+)/$', 'participation_edit'),
	url(r'^participation/add/$', '_participation_add'),
	url(r'^participation/delete/(?P<participation_id>\d+)/$', '_participation_delete'),

	#
	url(r'^tracksound/$', 'tracksound_default'),
	url(r'^tracksound/view/$', 'tracksound_default'),
	url(r'^tracksound/view/(?P<tracksound_id>\d+)/$', 'tracksound_view'),
	url(r'^tracksound/edit/(?P<tracksound_id>\d+)/$', 'tracksound_edit'),
	url(r'^tracksound/add/$', '_tracksound_add'),
	url(r'^tracksound/delete/(?P<tracksound_id>\d+)/$', '_tracksound_delete'),

	url(r'^tracksound/zero/(?P<tracksound_id>\d+)/$', '_tracksound_zero'),
	url(r'^tracksound/increment/(?P<tracksound_id>\d+)/$', '_tracksound_increment'),
	url(r'^tracksound/decrement/(?P<tracksound_id>\d+)/$', '_tracksound_decrement'),


	url(r'^role/$', 'role_default'),
	url(r'^role/view/$', 'role_default'),
	url(r'^role/view/(?P<role_id>\d+)/$', 'role_view'),
	url(r'^role/edit/(?P<role_id>\d+)/$', 'role_edit'),
	url(r'^role/add/$', '_role_add'),
	url(r'^role/delete/(?P<role_id>\d+)/$', '_role_delete'),

	url(r'^address/$', 'address_default'),
	url(r'^address/view/$', 'address_default'),
	url(r'^address/view/(?P<address_id>\d+)/$', 'address_view'),
	url(r'^address/edit/(?P<address_id>\d+)/$', 'address_edit'),
	url(r'^address/add/$', '_address_add'),
	url(r'^address/delete/(?P<address_id>\d+)/$', '_address_delete'),


	url(r'^sound/$', 'sound_default'),
	url(r'^sound/view/$', 'sound_default'),
	url(r'^sound/view/(?P<sound_id>\d+)/$', 'sound_view'),
	url(r'^sound/edit/(?P<sound_id>\d+)/$', 'sound_edit'),
	url(r'^sound/add/$', '_sound_add'),
	url(r'^sound/delete/(?P<sound_id>\d+)/$', '_sound_delete'),


	url(r'^participation_type/$', 'participation_type_default'),
	url(r'^participation_type/view/$', 'participation_type_default'),
	url(r'^participation_type/view/(?P<participation_type_id>\d+)/$', 'participation_type_view'),
	url(r'^participation_type/edit/(?P<participation_type_id>\d+)/$', 'participation_type_edit'),
	url(r'^participation_type/add/$', '_participation_type_add'),
	url(r'^participation_type/delete/(?P<participation_type_id>\d+)/$', '_participation_type_delete'),

	url(r'^state/$', 'state_default'),
	url(r'^state/view/$', 'state_default'),
	url(r'^state/view/(?P<state_id>\d+)/$', 'state_view'),
	url(r'^state/edit/(?P<state_id>\d+)/$', 'state_edit'),
	url(r'^state/add/$', '_state_add'),
	url(r'^state/delete/(?P<state_id>\d+)/$', '_state_delete'),
)